export function App1() {
  return (
    <div>
      <button onClick={() => console.log('按钮1的事件处理函数执行了')}>
        按钮1
      </button>
    </div>
  );
}

export function App2() {
  function clickHandler() {
    console.log('按钮2的事件处理函数执行了');
  }
  return (
    <div>
      <button onClick={clickHandler}>按钮2</button>
    </div>
  );
}

export function App3() {
  const clickHandler = () => {
    console.log('按钮3的事件处理函数执行了');
  };
  return (
    <div>
      <button onClick={clickHandler}>按钮3</button>
    </div>
  );
}

export function App4() {
  const clickHandler = function () {
    console.log('按钮4的事件处理函数执行了');
  };
  return (
    <div>
      <button onClick={clickHandler}>按钮4</button>
    </div>
  );
}
